<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/5/4
  Time: 22:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的订单</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@ include file="/page/comment/head.jsp"%>
    <link rel="stylesheet" type="text/css" href="static/css/form.css">
</head>
<body>
<%@include file="/page/enterprise/head_nav.jsp"%>
<div id="content">
    <c:if test="${empty requestScope.myorderItems}">
        暂无订单
    </c:if>

        <c:forEach items="${requestScope.myorderItems}" var="item" varStatus="s">
            <div class="card" style="margin-bottom: 10px">
                <div class="card-header">
                    序号：${s.count}  &nbsp;&nbsp;|&nbsp;
                    订单号：${item.orderid}
                </div>
                <div class="card-body">
                    <h5 class="card-title"> 名称：${item.name}</h5>
                    <p>数量${item.count}</p>
                    <p>￥${item.totalprice}</p>
                    <p>收货人：${item.relname}</p>
                    <p>联系电话：${item.telephone}</p>
                    <p>收货地址：${item.address}</p>
                    <c:if test="${item.status==0}">
                        <a  class="send btn btn-secondary btn-lg btn-block" href="orderItemServlet?action=sendOrderItem&id=${item.id}"><svg class="bi bi-pencil" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd" d="M11.293 1.293a1 1 0 0 1 1.414 0l2 2a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-.39.242l-3 1a1 1 0 0 1-1.266-1.265l1-3a1 1 0 0 1 .242-.391l9-9zM12 2l2 2-9 9-3 1 1-3 9-9z" clip-rule="evenodd"/>
                            <path fill-rule="evenodd" d="M12.146 6.354l-2.5-2.5.708-.708 2.5 2.5-.707.708zM3 10v.5a.5.5 0 0 0 .5.5H4v.5a.5.5 0 0 0 .5.5H5v.5a.5.5 0 0 0 .5.5H6v-1.5a.5.5 0 0 0-.5-.5H5v-.5a.5.5 0 0 0-.5-.5H3z" clip-rule="evenodd"/>
                        </svg> 去发货</a>
                    </c:if>
                    <c:if test="${item.status==1}">
                        <a  class="btn btn-secondary btn-lg btn-block" href="javascript:void(0)"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" clip-rule="evenodd"/>
                        </svg>
                            已发货</a>
                    </c:if>
                    <c:if test="${item.status ==2}">
                        <a  class="reminding btn btn-secondary btn-lg btn-block" href="javascript:void(0)"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" clip-rule="evenodd"/>
                        </svg>
                            提醒用户评价</a>
                    </c:if>
                    <c:if test="${item.status ==3}">
                        <a  class="btn btn-secondary btn-lg btn-block" href="javascript:void(0)"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                            <path fill-rule="evenodd" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" clip-rule="evenodd"/>
                        </svg>
                            已完成</a>
                    </c:if>
                </div>
            </div>
        </c:forEach>
   <%-- <c:forEach items="${requestScope.myorderItems}" var="item">
    <div class="card" style="margin-bottom: 10px">
        <div class="card-header">
            订单号：${item.orderid}
        </div>
        <div class="card-body">
            <h5 class="card-title"> 名称：${item.name}</h5>
            <p>数量${item.count}</p>
            <p>￥${item.totalprice}</p>
            <p>${item.relname}</p>
            <p>${item.telephone}</p>
            <p>${item.address}</p>
            <c:if test="${item.status==0}">
                <a  class="send btn btn-secondary btn-lg btn-block" href="orderItemServlet?action=sendOrderItem&id=${item.id}"><svg class="bi bi-pencil" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" d="M11.293 1.293a1 1 0 0 1 1.414 0l2 2a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-.39.242l-3 1a1 1 0 0 1-1.266-1.265l1-3a1 1 0 0 1 .242-.391l9-9zM12 2l2 2-9 9-3 1 1-3 9-9z" clip-rule="evenodd"/>
                    <path fill-rule="evenodd" d="M12.146 6.354l-2.5-2.5.708-.708 2.5 2.5-.707.708zM3 10v.5a.5.5 0 0 0 .5.5H4v.5a.5.5 0 0 0 .5.5H5v.5a.5.5 0 0 0 .5.5H6v-1.5a.5.5 0 0 0-.5-.5H5v-.5a.5.5 0 0 0-.5-.5H3z" clip-rule="evenodd"/>
                </svg> 去发货</a>
            </c:if>
            <c:if test="${item.status==1}">
                <a  class="btn btn-secondary btn-lg btn-block" href="javascript:void(0)"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" clip-rule="evenodd"/>
                </svg>
                    已发货</a>
            </c:if>
            <c:if test="${item.status>=2}">
                <a  class="btn btn-secondary btn-lg btn-block" href="javascript:void(0)"><svg class="bi bi-check" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
                    <path fill-rule="evenodd" d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z" clip-rule="evenodd"/>
                </svg>
                已完成</a>
            </c:if>
        </div>
    </div>
        </c:forEach>--%>
</div>
</body>
<script>
    $(function () {
        $("a.send").click(function () {
            if (confirm("确定发货码？")){

            }else {
                return false;
            }
        });
        $("a.reminding").click(function () {
            if (confirm("提醒用户评价码？")){

            }else {
                return false;
            }
        })
    })
</script>
</html>
